Integrand size = 26, antiderivative size = 86 \[ \int \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\frac {8 (-1)^{3/4} a^3 \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}-\frac {16 a^3}{3 d \sqrt {\cot (c+d x)}}-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{3 d \cot ^{\frac {3}{2}}(c+d x)} \]
[Out]
Time = 0.21 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3754, 3634, 3672, 3614, 214} \[ \int \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\frac {8 (-1)^{3/4} a^3 \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}-\frac {2 \left (a^3 \cot (c+d x)+i a^3\right )}{3 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {16 a^3}{3 d \sqrt {\cot (c+d x)}} \]
[In]
[Out]
Rule 214
Rule 3614
Rule 3634
Rule 3672
Rule 3754
Rubi steps \begin{align*} \text {integral}& = \int \frac {(i a+a \cot (c+d x))^3}{\cot ^{\frac {5}{2}}(c+d x)} \, dx \\ & = -\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{3 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {2}{3} \int \frac {(i a+a \cot (c+d x)) \left (-4 i a^2-2 a^2 \cot (c+d x)\right )}{\cot ^{\frac {3}{2}}(c+d x)} \, dx \\ & = -\frac {16 a^3}{3 d \sqrt {\cot (c+d x)}}-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{3 d \cot ^{\frac {3}{2}}(c+d x)}-\frac {2}{3} \int \frac {-6 i a^3-6 a^3 \cot (c+d x)}{\sqrt {\cot (c+d x)}} \, dx \\ & = -\frac {16 a^3}{3 d \sqrt {\cot (c+d x)}}-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {\left (48 a^6\right ) \text {Subst}\left (\int \frac {1}{6 i a^3-6 a^3 x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d} \\ & = \frac {8 (-1)^{3/4} a^3 \text {arctanh}\left ((-1)^{3/4} \sqrt {\cot (c+d x)}\right )}{d}-\frac {16 a^3}{3 d \sqrt {\cot (c+d x)}}-\frac {2 \left (i a^3+a^3 \cot (c+d x)\right )}{3 d \cot ^{\frac {3}{2}}(c+d x)} \\ \end{align*}
Time = 0.61 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.91 \[ \int \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^3 \, dx=-\frac {2 i a^3 \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)} \left (-12 (-1)^{3/4} \arctan \left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right )+\sqrt {\tan (c+d x)} (-9 i+\tan (c+d x))\right )}{3 d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 200 vs. \(2 (71 ) = 142\).
Time = 1.43 (sec) , antiderivative size = 201, normalized size of antiderivative = 2.34
method | result | size |
derivativedivides | \(\frac {a^{3} \left (-\frac {2 i}{3 \cot \left (d x +c \right )^{\frac {3}{2}}}-\frac {6}{\sqrt {\cot \left (d x +c \right )}}-i \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )-\sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )\right )}{d}\) | \(201\) |
default | \(\frac {a^{3} \left (-\frac {2 i}{3 \cot \left (d x +c \right )^{\frac {3}{2}}}-\frac {6}{\sqrt {\cot \left (d x +c \right )}}-i \sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )-\sqrt {2}\, \left (\ln \left (\frac {1+\cot \left (d x +c \right )-\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}{1+\cot \left (d x +c \right )+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\cot }\left (d x +c \right )\right )\right )\right )\right )}{d}\) | \(201\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 341 vs. \(2 (70) = 140\).
Time = 0.26 (sec) , antiderivative size = 341, normalized size of antiderivative = 3.97 \[ \int \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\frac {3 \, \sqrt {-\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt {-\frac {64 i \, a^{6}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a^{3}}\right ) - 3 \, \sqrt {-\frac {64 i \, a^{6}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (8 i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt {-\frac {64 i \, a^{6}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a^{3}}\right ) - 16 \, {\left (-5 i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + i \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + 4 i \, a^{3}\right )} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}}{12 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
[In]
[Out]
\[ \int \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^3 \, dx=- i a^{3} \left (\int i \sqrt {\cot {\left (c + d x \right )}}\, dx + \int \left (- 3 \tan {\left (c + d x \right )} \sqrt {\cot {\left (c + d x \right )}}\right )\, dx + \int \tan ^{3}{\left (c + d x \right )} \sqrt {\cot {\left (c + d x \right )}}\, dx + \int \left (- 3 i \tan ^{2}{\left (c + d x \right )} \sqrt {\cot {\left (c + d x \right )}}\right )\, dx\right ) \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 148 vs. \(2 (70) = 140\).
Time = 0.33 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.72 \[ \int \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^3 \, dx=-\frac {3 \, {\left (\left (2 i + 2\right ) \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + \left (2 i + 2\right ) \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + \left (i - 1\right ) \, \sqrt {2} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) - \left (i - 1\right ) \, \sqrt {2} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )\right )} a^{3} - 2 \, {\left (-i \, a^{3} - \frac {9 \, a^{3}}{\tan \left (d x + c\right )}\right )} \tan \left (d x + c\right )^{\frac {3}{2}}}{3 \, d} \]
[In]
[Out]
\[ \int \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3} \sqrt {\cot \left (d x + c\right )} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^3 \, dx=\int \sqrt {\mathrm {cot}\left (c+d\,x\right )}\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^3 \,d x \]
[In]
[Out]